<template>
  <div class="contents">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="发货出库" name="first">
        <el-row :gutter="5" type="flex">
          <el-col >
            <el-select placeholder="默认库房">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col >
            <el-select placeholder="分拣状态">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col >
            <el-select placeholder="全部状态">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col >
            <el-select placeholder="选择送货时间">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col >
            <el-select placeholder="选择线路">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col :span="3">
            <el-date-picker
              type="date"
              placeholder="选择日期"
              style="width: 115px;"
            ></el-date-picker>
          </el-col>
          <el-col >
            <el-input placeholder="输入客户名称/联系人/电话">
              <el-button slot="append" icon="el-icon-search"></el-button>
            </el-input>
          </el-col>
        </el-row>
        <div class="btn-fixed">
          <el-button>导出</el-button>
          <el-button>一键发货出库</el-button>
        </div>
        <el-table :data="table1" style="width: 100%; margin-top: 10px;">
          <el-table-column
            prop="date"
            label="日期"
            width="180"
          ></el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="180"
          ></el-table-column>
          <el-table-column prop="address" label="地址"></el-table-column>
        </el-table>
        <el-pagination
          background
          layout="total, prev, pager, next,sizes, jumper"
          :page-size="10"
          :page-sizes="[10, 20, 30, 40]"
          style="text-align: left;"
          :total="0"
        />
      </el-tab-pane>
      <el-tab-pane label="订单发货出库" name="second">
        <el-row :gutter="5" type="flex">
          <el-col>
            <el-select placeholder="默认库房">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col>
            <el-select placeholder="分拣状态">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col>
            <el-select placeholder="全部状态">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col>
            <el-select placeholder="选择送货时间">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col>
            <el-select placeholder="选择线路">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col>
            <el-date-picker
              type="date"
              placeholder="选择日期"
              style="width: 115px;"
            ></el-date-picker>
          </el-col>
          <el-col>
            <el-input placeholder="输入客户名称/订单号/联系人/电话">
              <el-button slot="append" icon="el-icon-search"></el-button>
            </el-input>
          </el-col>
          <el-col>
            <el-button
              style="margin-left: 15px;"
              type="text"
              @click="clickOpen"
            >
              <span :style="{ visibility: openCol ? 'hidden' : 'visible' }">
                收起
              </span>
              高级筛选
              <vab-icon
                :icon="openCol ? 'arrow-down-s-line' : 'arrow-up-s-line'"
              />
            </el-button>
          </el-col>
        </el-row>
        <div v-show="!openCol" style="margin-top: 10px;">
          <el-button>重置</el-button>
          <el-button type="primary">搜索</el-button>
        </div>
        <div class="btn-fixed">
          <el-button>一键发货出库</el-button>
          <el-button>导出</el-button>
        </div>
        <el-table :data="table2" style="width: 100%; margin-top: 10px;">
          <el-table-column
            prop="date"
            label="日期"
            width="180"
          ></el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="180"
          ></el-table-column>
          <el-table-column prop="address" label="地址"></el-table-column>
        </el-table>
        <el-pagination
          background
          layout="total, prev, pager, next,sizes, jumper"
          :page-size="10"
          :page-sizes="[10, 20, 30, 40]"
          style="text-align: left;"
          :total="0"
        />
      </el-tab-pane>
      <el-tab-pane label="发货差异单" name="third">
        <el-row :gutter="5" type="flex">
          <el-col>
            <el-select placeholder="默认库房">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col>
            <el-select placeholder="选择线路">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-col>
          <el-col>
            <el-date-picker type="date" placeholder="选择日期"></el-date-picker>
          </el-col>
          <el-col>
            <el-input placeholder="按商品名/编码搜索">
              <el-button slot="append" icon="el-icon-search"></el-button>
            </el-input>
          </el-col>
          <el-col>
            <el-button
              style="margin-left: 15px;"
              type="text"
              @click="clickOpenDiff"
            >
              <span :style="{ visibility: diffCol ? 'hidden' : 'visible' }">
                收起
              </span>
              高级筛选
              <vab-icon
                :icon="diffCol ? 'arrow-down-s-line' : 'arrow-up-s-line'"
              />
            </el-button>
          </el-col>
        </el-row>
        <div v-show="!diffCol" style="margin-top: 10px;">
          <el-form :model="formInline" label-width="140px">
            <el-form-item label="分拣与库存的差异值">
              <el-select v-model="formInline.region" placeholder="活动区域">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="分拣状态">
              <el-select v-model="formInline.region" placeholder="全部">
                <el-option label="未分拣" value="shanghai"></el-option>
                <el-option label="分拣中" value="beijing"></el-option>
                <el-option label="已分拣" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button>重置</el-button>
              <el-button type="primary">搜索</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="btn-fixed">
          <el-button>批量单位装换</el-button>
          <el-button>一键报溢</el-button>
          <el-button>导出</el-button>
        </div>
        <el-table :data="table3" style="width: 100%;margin-top:10px">
          <el-table-column width="50px" type="selection" align="center"></el-table-column>
          <el-table-column prop="address" label="商品编码"></el-table-column>
          <el-table-column prop="address" label="商品名称"></el-table-column>
          <el-table-column prop="address" label="描述"></el-table-column>
          <el-table-column prop="address" label="分拣状态"></el-table-column>
          <el-table-column prop="address" label="分拣单位"></el-table-column>
          <el-table-column prop="address" label="库存量"></el-table-column>
          <el-table-column prop="address" label="分拣量"></el-table-column>
          <el-table-column prop="address" label="差异"></el-table-column>
          <el-table-column prop="address" label="可转换单位"></el-table-column>
          <el-table-column prop="address" label="可转换库存"></el-table-column>
        </el-table>
        <el-pagination
          background
          layout="total, prev, pager, next,sizes, jumper"
          :page-size="10"
          :page-sizes="[10, 15, 20, 50, 100]"
          style="text-align: left;"
          :total="0"
        />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        activeName: 'first',
        table1: [],
        openCol: true,
        table2: [],
        diffCol: true,
        formInline: {},
        table3:[]
      }
    },
    methods: {
      handleClick(tab, event) {
        console.log(tab, event)
      },
      clickOpen() {
        this.openCol = !this.openCol
      },
      clickOpenDiff() {
        this.diffCol = !this.diffCol
      },
    },
  }
</script>

<style lang="scss" scoped>
  .contents {
    padding: 0 20px 10px;

    .btn-fixed {
      position: fixed;
      top: 133px;
      right: 50px;
      z-index: 12;
    }
  }
</style>
